package geektime.spring.springbucks;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignClient /*implements CommandLineRunner*/{

    @Autowired
    private Service service;

    @RequestMapping("/get/{id}")
    public String get(@PathVariable("id")Long id){
        return service.get(id);
    }

    //    @Override
//    public void run(String... args) throws Exception {
//        System.out.println("feign:"+service.get(1L));
//
//    }
}
